
//@符号表示 src路径
//导入aixos对象
import request from "@/utils/request"

//登录,data对象,传后端的数据
const findHotProducts = () => {
    //调用axios
    return request({
        // /api/代理成 http://localhost:8080/ 进行访问
        url: "/api/product/hotProducts",
        method: "get",
    })
}
//查询新品上市
const findNewProducts = () => {
    return request({
        url: "/api/product/newProducts",
        method: "get",
    })
}
//查询鞋的种类
const findCategories = () => {
    return request({
        url: "/api/product/categories",
        method: "get",
    })
}
//按id查询商品详情
const getProductDetail = (productId) => {
    return request({
        url: "/api/product/detail/" + productId,
        
        method: "get",
    })
}
//查询搜索商品
const searchProducts = (params) => {
    return request({
        url: "/api/product/search",
        method: "get",
        params
    })
}
const findAllProductsBrands=()=>{
    return request({
        url: "/api/product/brands",
        method: "get",
    })
}

export { findHotProducts,findNewProducts,findCategories,getProductDetail,searchProducts,findAllProductsBrands }